// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PUR_ARV
// * CreateDate    : 2014-06-05 18:30:25
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:25
// * LastChanger   : 2014-06-05 18:30:25
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class PurArvEntity : EntityBase
    {
        public PurArvTable TableSchema
        {
            get
            {
                return PurArvTable.Current;
            }
		}
		
		public PurArvEntity()
        {

        }
		
		public PurArvEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.ArvNo = Convert.ToString(CommonFunctions.ToObject(dr["ARV_NO"]));
			this.PoNo = Convert.ToString(CommonFunctions.ToObject(dr["PO_NO"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.SupplierName = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_NAME"]));
			this.SupplierCode = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_CODE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public PurArvEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.ArvNo = Convert.ToString(CommonFunctions.ToObject(dr["ARV_NO"]));
			this.PoNo = Convert.ToString(CommonFunctions.ToObject(dr["PO_NO"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.SupplierName = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_NAME"]));
			this.SupplierCode = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_CODE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return PurArvTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(PurArvTable.C_ID)); }
            set { SetData(PurArvTable.C_ID, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(PurArvTable.C_CREATED_BY)); }
            set { SetData(PurArvTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(PurArvTable.C_CREATED_DATE)); }
            set { SetData(PurArvTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(PurArvTable.C_UPDATED_BY)); }
            set { SetData(PurArvTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(PurArvTable.C_UPDATED_DATE)); }
            set { SetData(PurArvTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(PurArvTable.C_IS_ACTIVE)); }
            set { SetData(PurArvTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string ArvNo
        {
            get { return Convert.ToString(GetData(PurArvTable.C_ARV_NO)); }
            set { SetData(PurArvTable.C_ARV_NO, value); }
        }
		
        [DataMember]
        public string PoNo
        {
            get { return Convert.ToString(GetData(PurArvTable.C_PO_NO)); }
            set { SetData(PurArvTable.C_PO_NO, value); }
        }
		
        [DataMember]
        public string SupplierId
        {
            get { return Convert.ToString(GetData(PurArvTable.C_SUPPLIER_ID)); }
            set { SetData(PurArvTable.C_SUPPLIER_ID, value); }
        }
		
        [DataMember]
        public string SupplierName
        {
            get { return Convert.ToString(GetData(PurArvTable.C_SUPPLIER_NAME)); }
            set { SetData(PurArvTable.C_SUPPLIER_NAME, value); }
        }
		
        [DataMember]
        public string SupplierCode
        {
            get { return Convert.ToString(GetData(PurArvTable.C_SUPPLIER_CODE)); }
            set { SetData(PurArvTable.C_SUPPLIER_CODE, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(PurArvTable.C_REMARK)); }
            set { SetData(PurArvTable.C_REMARK, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(PurArvTable.C_STATUS)); }
            set { SetData(PurArvTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

